 <!DOCTYPE html>
<html lang="en">
<head>
	<meta http-equiv="content-type" content="text/html; charset=UTF-8">
	<meta charset="utf-8">
	<title>登录</title>
	<meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1, user-scalable=no">
	<meta name="description" content="">
	<meta name="author" content="">
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/static/user/css/cloud-admin.css" >
	
	<link href="__PUBLIC__/static/user/css/font-awesome.min.css" rel="stylesheet">
	<!-- DATE RANGE PICKER -->
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/static/user/css/daterangepicker-bs3.css" />
	<!-- UNIFORM -->
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/static/user/css/uniform.default.min.css" />
	<!-- ANIMATE -->
	<link rel="stylesheet" type="text/css" href="__PUBLIC__/static/user/css/animate.min.css" />
	</head>
 <div class="container">
<body class="login">	
	<!-- PAGE -->
	<section id="page">
			<!-- HEADER -->
			<header>
				<!-- NAV-BAR -->
				<div class="container">
					<div class="row">
						<div class="col-md-4 col-md-offset-4">
							
						</div>
					</div>
				</div>
				<!--/NAV-BAR -->
			</header>
			<!--/HEADER -->
			<!-- LOGIN -->
			<section id="login_bg" class="visible">
				<div class="container">
					<div class="row">
						<div class="col-md-4 col-md-offset-4">
							<div class="login-box">
								<h2 class="bigintro"></h2>
								<div class="divide-40"></div>
								<form id="form1" action="" method="post">
								  <div class="form-group">
									<label style="font-size: 14px;font-family: '微软雅黑';">帐号(手机号)</label>
									<i class="fa fa-envelope"></i>
									<input type="text" id="account" class="form-control" required="" name="user_account" maxlength="11" >
								  </div>
								  <div class="form-group"> 
									<label style="font-size: 14px;font-family: '微软雅黑';">密码</label>
									<i class="fa fa-lock"></i>
									<input type="password" id="pwd" class="form-control" required="" name="user_password" maxlength="15">
								  </div>
								  
								  <div>
									<!--<label class="checkbox"> <input type="checkbox" class="uniform" value=""> 记住密码</label>-->
									
										
									<button type="submit" class="btn btn-danger" style="font-size: 14px;font-family: '微软雅黑';">登录</button>
								  </div>
								</form>

								<div class="login-helpers">
									<a href="registerPage" style="text-decoration: none;font-size: 14px;font-family: '微软雅黑';">注册</a>
								</div>
								
							</div>
						</div>
					</div>
				</div>
			</section>
	</section>
	<!--/PAGE -->
	<!-- JAVASCRIPTS -->
	<!-- Placed at the end of the document so the pages load faster -->
	<!-- JQUERY -->
	<script src="__PUBLIC__/static/user/js/jquery-2.0.3.min.js"></script>
	<script src="__PUBLIC__/static/user/js/jquery.backstretch.min.js"></script>
	<script src="__PUBLIC__/static/user/js/jquery.cookie.js"></script>
	<!-- JQUERY UI-->
	<script src="__PUBLIC__/static/user/js/jquery-ui-1.10.3.custom.min.js"></script>
	<!-- BOOTSTRAP -->
	<script src="__PUBLIC__/static/bootstrap/js/bootstrap.min.js"></script>
	
	<script src="__PUBLIC__/static/bootstrap/js/md5.js"></script>
	<!-- UNIFORM -->
	<script type="text/javascript" src="__PUBLIC__/static/user/js/jquery.uniform.min.js"></script>
	<!-- CUSTOM SCRIPT -->
	<script src="__PUBLIC__/static/user/js/script.js"></script>
	<script>
		jQuery(document).ready(function() {		
			App.setPage("login_bg");  //Set current page
			App.init(); //Initialise plugins and elements
		});
	</script>
	<script type="text/javascript">
		function swapScreen(id) {
			jQuery('.visible').removeClass('visible animated fadeInUp');
			jQuery('#'+id).addClass('visible animated fadeInUp');
		}
	</script>
	<script type="text/javascript">
		$('#form1').submit(
					function(e) {
						e.preventDefault();
						var message = "";
						var phone = document.getElementById('account');
						var pwd = document.getElementById('pwd');
						if(phone.value == null || phone.value == "") {
							message += "账号不能为空！\n";
						} else if(!(/^1[3|4|5|6|7|8][0-9]\d{4,8}$/.test(phone.value))) {
							message += "账号格式不正确！\n";
						}
						if(pwd.value == null || pwd.value == "") {
							message += "密码不能为空！\n"
						}
						if(message != "") {
							alert(message);
						} else {
							$.ajax({
								type: "post",
								url: "login",
								cache: false,
								async: true,
								data: {
									'account': $("#account").val(),
									'pwd': hex_md5($("#pwd").val())
								},
								success: function(data) {
									if(data == "1") {
										window.location.href = "mai";
									} else if(data == "2") {
										alert("该账号不存在！");
									} else if(data == "3") {
										alert("密码错误！");
										$("#pwd").val() = "";
									} else {
										alert("出现错误！");
									}
								},
								error: function() {
									alert("服务器出错了");
								}
							});
						}
					}
				)
		
	</script>
	<!-- /JAVASCRIPTS -->
</body>
</html>